『Practical Haskell』
https://gyazo.com/b7e387e7da42c398bfa8794fbbe6804b
良さそうmrsekut.icon
2019/4/27と新しめ
About the Author xv
About the Technical Reviewer xvii
Acknowledgments xix
Introduction xxi
Part I: First Steps 1 (182)
Chapter 1 Going Functional 3 (14)
Why Haskell? 3 (5)
Why Pure Functional Programming? 4 (2)
Why Strong Static Typing? 6 (1)
The Haskell Ecosystem 7 (1)
The History of Haskell 8 (1)
Your Working Environment 8 (3)
Installing on Windows or Mac OS X 9 (1)
Installing on Linux 9 (2)
First Steps with GHCi 11 (2)
The Time Machine Store 13 (1)
Summary 14 (3)
Chapter 2 Declaring the Data Model 17 (46)
Characters, Numbers, and Lists 17 (10)
Characters 18 (1)
Numbers 19 (2)
Strings 21 (1)
Lists 22 (5)
Creating a New Project 27 (6)
Creating a project with Cabal 27 (2)
Creating a Project with Stack 29 (2)
Understanding Modules 31 (2)
Cabal and Stack 33 (1)
Defining Simple Functions 33 (7)
Creating a Simple Function 34 (1)
Specifying the Function's Type 34 (1)
Developing a Robust Example 35 (3)
Returning More Than One Value 38 (2)
Working with Data Types 40 (22)
Pattern Matching 44 (12)
Records 56 (6)
Summary 62 (1)
Chapter 3 Increasing Code Reuse 63 (46)
Parametric Polymorphism 64 (3)
Functions As Parameters 67 (10)
Higher-Order Functions 68 (2)
Anonymous Functions 70 (3)
Partial Application of a Function 73 (4)
More on Modules 77 (5)
Module Imports 77 (2)
Smart Constructors and Views 79 (3)
Diving into Lists 82 (19)
Folds 83 (4)
Lists and Predicates 87 (8)
Lists Containing Tuples 95 (1)
List Comprehensions 96 (5)
Haskell Origami 101 (5)
Summary 106 (3)
Chapter 4 Using Containers and Type Classes 109 (48)
Using Packages 110 (8)
Managing Dependencies 111 (2)
Building Packages 113 (5)
Obtaining Help 118 (1)
Containers: Maps, Sets, Trees, Graphs 118 (14)
Maps 119 (5)
Sets 124 (2)
Trees 126 (3)
Graphs 129 (3)
Ad Hoc Polymorphism: Type Classes 132 (11)
Declaring Classes and Instances 133 (4)
Built-in Type Classes 137 (6)
Binary Trees for the Minimum Price 143 (7)
Step 1: Simple Binary Trees 143 (2)
Step 2: Polymorphic Binary Trees 145 (2)
Step 3: Binary Trees with Monoidal Cache 147 (3)
Container-Related Type Classes 150 (5)
Functors 150 (3)
Foldables 153 (2)
Summary 155 (2)
Chapter 5 Laziness and Infinite Structures 157 (26)
An Infinite Number of Time Machines 158 (5)
Lazy Evaluation Model 163 (16)
Understanding Evaluation in Haskell 163 (5)
Problems with Laziness 168 (3)
Pattern Matching and Laziness 171 (2)
Profiling with GHC 173 (6)
Strictness Annotations 179 (3)
Summary 182 (1)
Part II: Data Mining 183 (116)
Chapter 6 Knowing Your Clients Using Monads 185 (44)
Data Mining 186 (16)
Implementing K-means 186 (7)
Lenses 193 (9)
Discovering Monads 202 (15)
Watching Out for Incomplete Data 202 (3)
Combinators for State 205 (4)
Dissecting the Combinators 209 (3)
do Notation 212 (4)
Monad Laws 216 (1)
Different Sorts of State 217 (10)
State and Lenses 218 (2)
Reader, Writer, and RWS 220 (4)
Mutable References with ST 224 (3)
Summary 227 (2)
Chapter 7 More Monads: Now for Recommendations 229 (40)
Returning More Than One Value 230 (7)
The List Monad 230 (2)
A New View Over Monads 232 (1)
Failures and Alternatives 233 (4)
Association Rules Learning 237 (10)
Flattening Values into Transactions 238 (3)
The Apriori Algorithm 241 (6)
Search Problems 247 (5)
Paths in a Graph 247 (2)
The Logic Monad 249 (3)
Monads and Lists Redux 252 (7)
Combining Values Under a Monad 252 (4)
Monad Comprehensions 256 (3)
Combining Monads 259 (9)
Monad Transformers 260 (5)
Monad Classes 265 (3)
Summary 268 (1)
Chapter 8 Working in Several Cores 269 (30)
Parallelism, Concurrency, and Distribution 269 (2)
The Par Monad 271 (8)
Futures 271 (3)
Dataflow Parallelism with IVars 274 (2)
Parallelizing the Apriori Algorithm 276 (3)
Software Transactional Memory 279 (9)
Concurrent Use of Resources 280 (2)
Atomic Transactions 282 (4)
Rolling Back Transactions 286 (2)
Producer-Consumer Queues 288 (8)
Single-Process Queues 288 (2)
Message Queues Using AMQP 290 (3)
AMQP in Haskell 293 (3)
Summary 296 (3)
Part III: Resource Handling 299 (140)
Chapter 9 Dealing with Files: 10 and Conduit 301 (42)
Basic Input and Output 302 (5)
Randomness 307 (3)
Working with Files 310 (6)
Reading and Writing 310 (4)
Handling Files 314 (2)
Error Handling 316 (10)
Pure Errors 316 (3)
Catching Exceptions 319 (5)
Throwing Exceptions 324 (2)
Streaming Data with Conduit 326 (9)
Problems With Lazy Input/Output 326 (2)
Introducing Conduits 328 (4)
Accessing Files via Conduit 332 (3)
Looking Further Than Text Files 335 (6)
Basic Networking 335 (2)
Binary Serialization 337 (2)
Comma-Separated Values 339 (2)
Summary 341 (2)
Chapter 10 Building and Parsing Text 343 (36)
The Five Textual Data Types 343 (6)
Building as Fast as the Wind 349 (4)
Parsing with attoparsec 353 (7)
Introducing New Type Classes 360 (10)
Applicative 361 (2)
Functors, Applicatives, and Monads 363 (3)
Don't Overengineer: Just Use JSON 370 (8)
Summary 378 (1)
Chapter 11 Safe Database Access 379 (30)
Database Access Landscape 379 (3)
Abstracting Over Several DBMSs 380 (1)
Introducing Persistent and Esqueleto 381 (1)
Connection 382 (3)
Schemas and Migrations 385 (10)
Describing the Entities 386 (5)
Creating the Database 391 (4)
Queries 395 (9)
Queries by Identifier or Uniqueness 395 (2)
Selecting Several Entities 397 (3)
SQL Queries with Esqueleto 400 (4)
Insertions, Updates, and Deletions 404 (4)
Summary 408 (1)
Chapter 12 Web Applications 409 (30)
Haskell Web Ecosystem 409 (5)
Web Frameworks 410 (2)
Compilation to JavaScript 412 (2)
RESTful Structure 414 (1)
Back End with Spock 415 (13)
Simple Skeleton 415 (2)
Showing Products from the Database 417 (6)
Inserting New Products Using Forms 423 (5)
Front End with Elm 428 (9)
Retrieving Products 432 (5)
Summary 437 (2)
Part IV: Domain Specific Languages 439 (84)
Chapter 13 Strong Types for Describing Offers 441 (46)
Domain-Specific Languages 441 (4)
Embedding Your Language in Haskell 442 (3)
The Offers Language 445 (7)
Adding Safety to the Expression Language 448 (4)
Type-Level Programming 452 (5)
Two Styles of Programming 454 (1)
Representing Natural Numbers 455 (2)
Functional Dependencies 457 (9)
Categories of Products with FDs 457 (4)
Vectors Using FDs 461 (3)
Enforcing the Presents Rule with FDs 464 (2)
Type Families 466 (8)
Vectors Using TFs 466 (2)
Enforcing the Presents Rule with TFs 468 (1)
Categories of Products with TFs 469 (5)
A Further Refinement to the Presents Rule 474 (3)
Cooking with Singletons 477 (1)
Enforcing the Duration Rule 478 (7)
Summary 485 (2)
Chapter 14 Interpreting Offers with Attributes 487 (36)
Interpretations and Attribute Grammars 488 (3)
A Simple Interpretation 488 (1)
Introducing Attribute Grammars 488 (3)
Your First Attribute Grammar 491 (7)
Synthesizing the Result 491 (3)
Executing the Attribute Grammar 494 (1)
Integrating UUAGC in Your Package 495 (3)
Expressions Interpretation 498 (7)
Using an Attribute Grammar 498 (3)
Precomputing Some Values 501 (2)
A Different (Monadic) View 503 (2)
Offer Interpretations 505 (8)
Checking the Presents Rule 505 (2)
Showing an HTML Description 507 (6)
Programming with Data Types 513 (7)
Origami Programming Over Any Data Type 513 (3)
Data Type-Generic Programming 516 (4)
Summary 520 (3)
Part V: Engineering the Store 523 (52)
Chapter 15 Documenting, Testing, and Verifying 525 (22)
Documenting Binary Trees with Haddock 526 (4)
Unit Testing with HUnit 530 (6)
Declaring Tests in Cabal 531 (1)
Writing Unit Tests 532 (4)
Randomized Testing with QuickCheck 536 (5)
Testing List Properties 537 (1)
Testing Binary Tree Properties 538 (3)
Formal Verification with LiquidHaskell 541 (5)
Describing Binary Search Trees 544 (2)
Summary 546 (1)
Chapter 16 Architecting Your Application 547 (20)
Tools 547 (4)
Project and Dependency Management 548 (1)
Code Style 548 (1)
Documentation 549 (1)
Test and Verification 549 (1)
Benchmarking 549 (1)
Profiling 550 (1)
Coverage 550 (1)
Remote Monitoring 550 (1)
Design Patterns and Functional Programming 551 (2)
Medium-Level Guidelines 553 (2)
Use Higher-Order Combinators 553 (1)
Refactor 553 (1)
Use Type Classes Wisely 553 (1)
Enforce Invariants via the Type System 554 (1)
Stay (As) Pure and Polymorphic (As 554 (1)
Possible)
Patterns with Monads 555 (10)
Summary of Monads 555 (6)
Restrictive Monad Classes 561 (1)
Roll Your Own Monad 562 (3)
Summary565 (2)
Chapter 17 Looking Further 567 (8)
Projects 567 (6)
Data Mining Library 568 (2)
Store Network Client 570 (1)
Administration Interface and Tetris 571 (2)
Additional Haskell Resources 573 (2)
Other Functional Languages 574 (1)
Appendix: Time Travelling with Haskell 575 (4)
Index 579